package cn.zebra.dev.admin.module.discounts.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author wzhsun.cn
 * @version 1.0
 * @date 2020/5/8
 */

@Getter
@Setter
public class DiscountsShopListVO {

    @ApiModelProperty("商品id")
    @NotNull(message = "请输入商品id，如果是全店铺优惠券请输入0")
    private Long productId;

    @ApiModelProperty("优惠券金额")
    @NotNull(message = "请输入优惠券金额，单位(元)")
    @Min(value = 1,message = "优惠券金额输入有误，最低为1元")
    private BigDecimal amount;

    @ApiModelProperty("优惠券描述")
    @NotBlank(message = "输入本次优惠的理由/文案")
    private String describes;

    @ApiModelProperty("优惠券数量")
    @NotNull(message = "请输入优惠券数量")
    @Min(value = 1,message = "优惠券数量输入有误，最低为1张")
    private Long discountsNumb;

    @ApiModelProperty("条件类型0表示没有条件1表示等级条件2表示积分条件")
    @NotNull(message = "请输入领取此优惠券的条件，0表示无需条件")
    private Integer conditionType;

    @ApiModelProperty("实际条件")
    private Long conditions;

    @ApiModelProperty("起始时间")
    @NotNull(message = "请输入优惠券起始时间")
    private LocalDateTime startTime;

    @ApiModelProperty("过期时间")
    @NotNull(message = "请输入优惠券的过期时间")
    private LocalDateTime endTime;

    @ApiModelProperty("优惠券图片")
    @NotNull(message = "请输入优惠券的图片")
    private String discountsImg;

}
